package graph;

public class ShapeTest {
    public static void main(String[] args) {
        Shape shape;

        // 测试三角形
        shape = new Triangle(3, 4, 5);
        System.out.println("Triangle Perimeter: " + shape.length());

        // 测试长方形
        shape = new Rectangle(4, 6);
        System.out.println("Rectangle Perimeter: " + shape.length());

        // 测试圆形
        shape = new Circle(5);
        System.out.println("Circle Circumference: " + shape.length());

        // 测试无效的三角形
        shape = new Triangle(1, 2, 3);
        System.out.println("Invalid Triangle Perimeter: " + shape.length());

        // 测试无效的长方形
        shape = new Rectangle(-1, 2);
        System.out.println("Invalid Rectangle Perimeter: " + shape.length());

        // 测试无效的圆形
        shape = new Circle(-1);
        System.out.println("Invalid Circle Circumference: " + shape.length());
    }
}
